package com.cloud.pole.msg.model.enums;

public enum SmsSendStatus {
	STATUS_CHECK(0, "审核中"),
	SUBMIT_ERR(-1, "提交失败"),
	START_SEND(1, "开始发送"),
	SUBMIT_OK(2, "提交成功"),
	RECV_OK(3, "接收成功"),
	RECV_ERR(-2, "接收失败"),
	TEMPLATE_ERR(-3, "模版不存在"),
	TEMPLATE_LIMITED(-4, "短信发送次数超出上限"),
    ;
	
	 //编码
    public int code;
    //说明
    public String description;
    
    SmsSendStatus(int code, String description) {
    	this.code = code;
        this.description = description;
    }
    
    public static String description(int code) {
        for (SmsSendStatus status : SmsSendStatus.values()) {
            if (status.code == code) {
                return status.description;
            }
        }
        return "未知状态";
    }
}
